---
title: clsProviderSearch.clsSearchResults
summary: API reference for clsProviderSearch.clsSearchResults.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-21
library: SAIF.Business.View.Provider
reference_type: embedded
---

# clsProviderSearch.clsSearchResults

`clsSearchResults` represents one materialised row of a provider search, produced by `clsProviderSearch.searchForProvider()` from the dynamically built SQL. Beyond the raw columns returned by the query, it computes a derived `SortName` value used to present person names in a natural "last, first" sort order distinct from business names.

## Purpose
- Carries the identifying and display data for one matched provider location (name, type, address, phone, tax/other IDs) as returned by SQL-SRCH-01.
- Derives a person's sort name by taking the text before the first space and re-appending everything from the first comma onward, while business rows and rows without a comma sort on the full name unchanged ([BR-SRCH-006](../../business-rules.md#br-srch-006-sort-name-derivation)).

## Context
- Namespace: `SAIF.Business.View.Provider`
- Assembly/package: `SAIF.Business.View.Provider` (embedded/project-compiled); also distributed as the NuGet package `SAIF.BOF.Business.View.Provider`.

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `ProviderLocationID` | `ReadOnly Property ProviderLocationID As Decimal` | Identifies the matched provider location row. |
| `FullName` | `ReadOnly Property FullName As String` | The full display name (business or person) as returned by the search query and used to order results (`ORDER BY fullNAME ASC`). |
| `SortName` | `ReadOnly Property SortName As String` | Derived sort key: for a person name with a comma, text before the first space combined with everything from the first comma; business rows and comma-less rows keep the full name ([BR-SRCH-006](../../business-rules.md#br-srch-006-sort-name-derivation)). |
| `ProviderTypeCode` | `ReadOnly Property ProviderTypeCode As String` | The provider type code of the matched location. |
| `Address` | `ReadOnly Property Address As String` | The address text (street/city/state/zip components) of the matched location as returned by the search query. |
| `PhoneNumber` | `ReadOnly Property PhoneNumber As String` | The phone number of the matched location as returned by the search query. |
| `IsValid` | `ReadOnly Property IsValid As Boolean` (overridden from `clsBusinessBase`) | Reflects the type's rule-check state; not used to gate any write since none exist. |
| `IsDirty` | `ReadOnly Property IsDirty As Boolean` (overridden from `clsBusinessBase`) | Indicates in-memory field changes; has no effect on persistence since this type is a read-only search projection ([BR-DATA-001](../../business-rules.md#br-data-001-no-write-operations-are-supported)). |

## Behavioral notes
- OP-09: each row is materialised as search results are read from `SqlHelper.ResultSetQuery`, computing `SortName` via `FormatSortName` at construction time ([BR-SRCH-006](../../business-rules.md#br-srch-006-sort-name-derivation)).
- Result materialisation stops once the owning `clsProviders` collection would exceed 299 entries, so a `clsSearchResults` instance is never created for rows beyond the 300th match ([BR-SRCH-007](../../business-rules.md#br-srch-007-search-results-capped-at-300-rows)).

## Constraints and usage notes
- Read-only projection object; not intended for editing or persistence — no create/update/delete SQL exists for search results ([BR-DATA-001](../../business-rules.md#br-data-001-no-write-operations-are-supported)).

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- SAIF.Business.View.Provider/clsProviderSearch.vb
